home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 27.zip / BS1 part 27 / ImageMaster_d3.adf / piarc.lzh.parta / Ellipse.rxwp < prev    next >
Text File  |  1992-10-27  |  1KB  |  56 lines

  1. /* Test rexx script to fill wipe buffer */
  2.  
  3. parse arg cframe mframe
  4.  
  5. /*
  6.  * open rexxsupport.library -- needed for some functions
  7.  */
  8. if ~show('L',"rexxsupport.library") then do
  9.   if addlib('rexxsupport.library',0,-30,0) then do
  10.       /* everything's ok */
  11.     end;
  12.   else do
  13.     say 'We Have A Library Problem, Unable To Load "rexxsupport.library"';
  14.     say 'Cannot operate wipe.rexx without this library - sorry!';
  15.     exit 10;
  16.     end;
  17.   end;
  18.  
  19. /*
  20.  * This will automatically direct the script to the proper
  21.  * software, if it is running.
  22.  */
  23. prtnme = 'IP_Port'; /* assume Image Professional */
  24. if show('P','IP_Port') = 0 then do
  25.   if show('P','IM_Port') = 0 then do
  26.     say "Can't find image processor's ARexx port!!!"; /* not running? */
  27.     say "This script requires IP, IM or IM F/c to run!";
  28.     exit(20);
  29.     end;
  30.   else do
  31.     prtnme = 'IM_Port'; /* That's the thing about assumptions... */
  32.     end;                 /* We make em, user's break em.          */
  33.   end;
  34.  
  35. options;
  36. address;
  37.  
  38.   if mframe = 0 then do
  39.       call open(fhandle,'ram:IM_WIPE.tmp2','write');      /* open the file */
  40.       junk = writeln(fhandle, 1);
  41.       junk = writeln(fhandle, 1);
  42.       junk = writeln(fhandle, 1);
  43.       junk = writeln(fhandle, 1);
  44.       junk = writeln(fhandle, 1);
  45.       call close(fhandle);                     /* close the file    */
  46.       end;
  47.   else do
  48.     fp = cframe / mframe;
  49.     fp = fp * 0.707;
  50.     address("IM_WIPER");
  51.     'NGON '||fp||','||fp||',48'
  52.     'close'
  53.     end;
  54.  
  55.   exit 0;
  56.